package com.hue.netty.day03.rpc.client;

import com.hue.netty.day03.rpc.common.HelloService;
import com.hue.netty.day03.rpc.netty.NettyClient;

/*
    客户端的启动器
 */
public class ClientBoot {
    private static String startWith = "nettyrpc#";

    public static void main(String[] args) {
        //创建客户端
        NettyClient client = new NettyClient();
        //创建HelloService代理对象
        HelloService helloService = (HelloService) client.getBean(HelloService.class, startWith);
        String result = helloService.hello("netty rpc!");
        System.out.println(result);
    }
}
